package com.gc.ykqx.service.util;

import android.app.Application;
import android.content.Context;

import com.zhy.http.okhttp.OkHttpUtils;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;

/**
 * Created by clem on 2017/3/24.
 * 发布版sha1：B9:73:B0:22:3E:0D:38:FA:C7:39:51:CB:30:F2:67:2E:AF:9E:CB:95
 * 调试版sha1：4C:CA:8F:82:D4:EB:16:C4:D7:C5:FB:17:98:CD:F0:AA:7B:41:71:AF
 */

public class App extends Application {
    private static Context context;

    @Override
    public void onCreate() {
        super.onCreate();
        context = getApplicationContext();
        OkHttpClient okHttpClient = new OkHttpClient.Builder()
                .connectTimeout(10000L, TimeUnit.MILLISECONDS)
                .readTimeout(10000L, TimeUnit.MILLISECONDS)
                .build();
        OkHttpUtils.initClient(okHttpClient);
    }

    public static Context getContext() {
        return context;
    }

}
